#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
void rotate(int* nums, int numsSize, int k)
{
    int* cpy = (int*)malloc(numsSize * sizeof(int));
    int i = 0;
    int n = numsSize - k;

    for (i = 0; i < numsSize; i++)
    {
        cpy[(i+k)%numsSize] = nums[i];
    }
    for (i = 0; i < numsSize; i++)
    {
        nums[i] = cpy[i];
    }

}

int main()
{
    int nums[2] = { 1,2 };
    rotate(nums, 2, 3);
	return 0;
}